<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页</title>
<%@ include file="/pages/inc/taglibs.jsp"%>
<%@ include file="/pages/inc/header.jsp"%>
<%@ include file="/pages/inc/common.jsp"%>
</head>
<body>
	<div class="container-fluid">
		<table class="table">
			<tbody>
				<tr>
					<td class="inputLabelTd">项目：</td>
					<td class="inputTd"><select id="projectSelect"
						name="projectSelect" class="select"></select></td>
				</tr>
		</table>
		<input type="hidden" id="projectId" value ="">
		<div id="tabs_sheet5">
			<ul>
				<li><a href="#tabs-2" onclick="showExternalEmployee()">外聘人员费用</a></li>
				<li><a href="#tabs-3" >直接投入费用</a></li>
				<li><a href="#tabs-4" onclick="showDevice()">设备使用情况</a></li>
				<li><a href="#tabs-5">无形资产摊销</a></li>
				<li><a href="#tabs-6">新产品设计费</a></li>
			</ul>
			<div id="tabs-2"></div>
			<div id="tabs-3"></div>
			<div id="tabs-4"></div>
			<div id="tabs-5"></div>
			<div id="tabs-6"></div>
		</div>
	</div>
	<script type="text/javascript">
		new biz.tabs({
			id : "#tabs_sheet5",
			position : "top",
			collapsible : true
			//实现可折叠的标签页
		});
		new biz.select({
		    id:"#projectSelect",
		    url:"<c:url value="/deduction/project/list" />",
		    onchange:function(e,data) {
		        $("#projectId").val(data.value);
		        showExternalEmployee(data.value);
		        showDevice(data.value);
		    }
		});
		
		function showProjectEmployee() {
			$.ajax({
				url : '<c:url value="/company/project" />',
				data : {
				//userName : userName,
				//password : password
				},
				type : 'POST',
				dataType : 'html',
				success : function(data) {
					$("#tabs-1").html("");
					$("#tabs-1").html(data);
				}
			});

		}

		function showExternalEmployee(projectId) {
			$.ajax({
				url : '<c:url value="/deduction/external" />',
				data : {
					projectId : projectId,
					//password : password
				},
				type : 'POST',
				dataType : 'html',
				success : function(data) {
					$("#tabs-2").html("");
					$("#tabs-2").html(data);
				}
			});
		}

		function showDevice(projectId) {
			$.ajax({
				url : '<c:url value="/deduction/device" />',
				data : {
					projectId : projectId,
				//password : password
				},
				type : 'POST',
				dataType : 'html',
				success : function(data) {
					$("#tabs-4").html("");
					$("#tabs-4").html(data);
				}
			});
		}
	</script>
</body>
</html>